<?php
/**
 * Created by PhpStorm.
 * Author: Sojo
 * Date: 2017/2/16
 * Time: 19:33
 */
namespace App\Api\Service\Routes;

use Dingo\Api\Routing\Router;

class ProductRoute
{
    public function map(Router $router)
    {
        $router->group(['namespace' => 'Product\Controllers', 'prefix' => 'product'], function ($router) {
            $router->any('list', 'ProductController@getProductList');

            //列表里增加新
            $router->any('deallist', 'ProductController@getProductDealList');

            $router->any('info', 'ProductController@getProductInfo');
            $router->any('add', 'ProductController@addProduct');
            $router->any('edit', 'ProductController@editProduct');
            $router->any('delete', 'ProductController@deleteProduct');
            $router->any('attr-list', 'AttrController@getProductAttrList');
            $router->any('print', 'ProductController@printer');
            //材料
            $router->any('detail', 'IndexController@detail');
            $router->any('go-create', 'IndexController@goCreate');
            $router->any('create', 'IndexController@create');
            $router->any('preAdd', 'IndexController@preAdd');

            //集合材料列表
            $router->any('getAssemblageMaterialList', 'ProductController@getAssemblageMaterialList');
            $router->any('getAssemblageMaterialDealList', 'ProductController@getAssemblageMaterialDealList');
            //新加SKU（实际）材料
            $router->any('submitActualMateril', 'ProductController@submitActualMateril');
            //修改集合材料
            $router->any('getAssemblageMaterialInfo', 'ProductController@getAssemblageMaterialInfo');
            //修改集合材料提交
            $router->any('editAssemblageMaterial', 'ProductController@editAssemblageMaterial');
            //删除集合材料
            $router->any('deleteAssemblageMaterial', 'ProductController@deleteAssemblageMaterial');


            //退品材料-列表
            $router->any('getMaterialRetreatList', 'ProductController@getMaterialRetreatList');
            //退品材料-详情
            $router->any('getMaterialRetreatDetail', 'ProductController@getMaterialRetreatDetail');

            //获得退品流水
            $router->any('get-water-list', 'ProductController@getWaterList');

            //获取分类下所有集合材料信息
            $router->any('getAssemblageMaterialListByCategoryId', 'ProductController@getAssemblageMaterialListByCategoryId');

            //获取材料列表全选后所有的材料ID（集合材料）
            $router->any('getAssemblageMaterialIdList', 'ProductController@getAssemblageMaterialIdList');

            //批量添加供应商材料
            $router->any('batchCreateSupplierMaterial', 'ProductController@batchCreateSupplierMaterial');

        });
    }
}